﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Reportes_wfViewerPopUpSinFiltro : System.Web.UI.Page
{
    string uri_reportserver;
    protected void Page_Load(object sender, EventArgs e)
    {
        uri_reportserver = ConfigurationManager.AppSettings["URLReportServer"].ToString();

        if (Request.QueryString["rep"] != null)
        {
            if (Request.QueryString["rep"].ToString() == "rsRptInfDiarioV2")
                lblFrame.Text = "<iFrame width=\"1000px\" height=\"700px\" src=\"" + uri_reportserver + "?/HHo_ReportService/" + Request.QueryString["rep"].ToString() + "&rs:Command=Render&FECINF=" + Request.QueryString["par"].ToString() + "&AREAID=" + Request.QueryString["val"].ToString() + "&rc:Parameters=False&rc:ToolBar=True\"  />";

            if (Request.QueryString["rep"].ToString() == "rsrptNegociacion")
                lblFrame.Text = "<iFrame width=\"1000px\" height=\"700px\" src=\"" + uri_reportserver + "?/HHo_ReportService/" + Request.QueryString["rep"].ToString() + "&rs:Command=Render&FEC_NEG=" + Request.QueryString["par"].ToString() + "&FECINFO=" + Request.QueryString["par"].ToString() + "&ID_AREA=" + Request.QueryString["val"].ToString() + "&AREAID=" + Request.QueryString["val"].ToString() + "&VISTA=0" + "&rc:Parameters=False&rc:ToolBar=True\"  />";

            if (Request.QueryString["rep"].ToString() == "rsRptProgV2")
                lblFrame.Text = "<iFrame width=\"1000px\" height=\"700px\" src=\"" + uri_reportserver + "?/HHo_ReportService/" + Request.QueryString["rep"].ToString() + "&rs:Command=Render&FECINFO=" + Request.QueryString["par"].ToString() + "&AREAID=" + Request.QueryString["val"].ToString() + "&rc:Parameters=False&rc:ToolBar=True\"  />";

        }
        else
        {
            lblFrame.Text = "ERROR: No se ha ingersado el reporte";
        }
        
    }
}
